Skip to content

docs: add deno desktop reference page#3085

Draft
lunadogbot wants to merge 12 commits into
denoland:mainfrom
lunadogbot:docs/2.8-deno-desktop
Draft

docs: add deno desktop reference page#3085
lunadogbot wants to merge 12 commits into
denoland:mainfrom
lunadogbot:docs/2.8-deno-desktop

Conversation

@lunadogbot

Copy link
Copy Markdown
Contributor

Summary

Adds a reference page for the new (experimental) deno desktop subcommand from the 2.8 milestone (denoland/deno#33441). The page documents the public-facing surface in the upstream PR and explicitly marks it experimental, since the API is still evolving.

Covered:

  • Quick start, including framework-detection mode (deno desktop .).
  • The three rendering backends — cef, webview, raw — and how WEF binaries are downloaded/cached.
  • Framework auto-detection list (Next.js, Astro, Fresh, Remix, Nuxt, SvelteKit, SolidStart, TanStack Start, Vite SSR) and the --hmr flow.
  • The Deno.BrowserWindow API surface (window lifecycle, bind/unbind RPC, executeJs, menus, native handle), plus Deno.dock and Deno.Tray.
  • Native prompt() / alert() / confirm() and the desktop.errorReporting.url hook.
  • Unified DevTools (--inspect / --inspect-brk / --inspect-wait).
  • Auto-updater (Deno.autoUpdate, Deno.desktopVersion).
  • Cross-compile and per-platform output formats (.app / .dmg / .exe / .AppImage).
  • The desktop config block in deno.json.

Also notes what is not yet implemented (codesigning, MSI, deb/rpm, notifications, clipboard, secureStorage).

Sidebar entry in runtime/_data.ts, entry in the CLI index page.

Test plan

  • deno task serve — page renders, sidebar entry resolves.
  • Page will need a follow-up sweep once the upstream PR settles. Marked experimental at the top so readers don't take it as gospel.

lunadogbot and others added 6 commits April 29, 2026 11:48
Adds a CLI reference page for the new (experimental) deno desktop
subcommand which builds self-contained desktop apps from a Deno
project. Documents the three rendering backends (cef / webview / raw),
framework auto-detection, HMR, the Deno.BrowserWindow / Deno.Tray /
Deno.dock APIs, the unified DevTools session, the auto-updater, the
cross-compile output formats, and the new \`desktop\` block in
deno.json. Marks the surface as still evolving. Adds entries to the
CLI index and sidebar.

Refs denoland/deno#33441
Adds a new runtime/desktop/ section with 16 guides covering configuration,
backends, framework auto-detection, HTTP serving, the BrowserWindow API,
bindings, menus, tray/dock, dialogs, HMR, unified DevTools, auto-update,
error reporting, distribution, and a comparison vs Electron/Tauri/etc.

Slims down runtime/reference/cli/desktop.md to a flag reference that links
into the new section, and wires up the sidebar in runtime/_data.ts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops `command: desktop` and `openGraph*` frontmatter so renderCommand.tsx
isn't invoked — there is no `desktop` entry in `_commands_reference.json`
yet, and the renderer accesses `.about` unconditionally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@crowlKats crowlKats changed the base branch from main to 2.8 May 5, 2026 11:43

@fibibot fibibot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds 2,701 lines, which is over the scheduled-review size limit. Can this be split into smaller PRs, for example the reference page skeleton first and the generated/long-form sections separately?

@crowlKats

Copy link
Copy Markdown
Member

Deferred from this release

@crowlKats crowlKats changed the title docs: add deno desktop reference page (2.8) docs: add deno desktop reference page May 19, 2026
@crowlKats crowlKats marked this pull request as draft May 19, 2026 14:09
crowlKats added 3 commits June 9, 2026 20:36
Update the desktop docs to match the implemented API:

- Notifications: add a dedicated page for the Web `Notification` API +
  permission flow; drop the stale "not yet a Deno API" note.
- Menus: `MenuItem` is a tagged union (`item`/`submenu`/`separator`/`role`),
  not a flat object; roles are now exposed; fix `showContextMenu(x, y, menu)`.
- Windows: constructor options (`frameless`/`noActivate`/`transparentTitlebar`),
  `isClosed()`/`isVisible()`/etc. are methods, `executeJs` is non-generic,
  `getNativeWindow()` returns an `UnsafeWindowSurface`; drop `BrowserWindow.main`.
- Tray/dock: add `getBounds()` + `attachPanel()` popovers; fix dock to
  `bounce(boolean)`/`setVisible`/`setMenu` + `reopen`; drop `clearMenu`.
- Serving: `DENO_SERVE_ADDRESS` is `tcp:127.0.0.1:<port>`, fix URL examples.
- Auto-update: patches require a `sha256`; document Ed25519 signed manifests.
- Config/distribution: add `app.identifier` + `macos.codesignIdentity`;
  macOS bundles are code-signed (ad-hoc by default).
@crowlKats crowlKats changed the base branch from 2.8 to main June 9, 2026 19:48
and stages the result for the next launch. If the next launch fails, the runtime
rolls back to the previous version automatically.

The update mechanism is inspired by Electrobun: small `bsdiff` patches instead

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well be inspired by deno upgrade which uses bsdiff. Seems like an implementation detail that doesn't need to be mentioned

@bartlomieju bartlomieju left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all em-dashes from this PR

## Calling `autoUpdate()`

```ts
Deno.autoUpdate({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this throw during deno run?

Comment on lines +32 to +34
group (WebView). Calls go through `tokio::sync::mpsc` channels and `oneshot`
channels for responses; the backend dispatches them via a notify / poll pattern
in its run loop.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tokio is implementation detail and shouldn't be mentioned

| **Consistent rendering** | Yes | No | No | No | Yes (CEF) |
| **Process model** | Multi-process | Multi-process | Multi-process | Single process | Multi-thread |
| **Backend ↔ UI** | IPC | IPC | IPC | Native Rust | In-process channels |
| **App size** | ~100 MB+ | ~14 MB | ~2–10 MB | ~5 MB | varies (CEF or system) |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put actual values, varies looks bad if all other have size specified

| **Process model** | Multi-process | Multi-process | Multi-process | Single process | Multi-thread |
| **Backend ↔ UI** | IPC | IPC | IPC | Native Rust | In-process channels |
| **App size** | ~100 MB+ | ~14 MB | ~2–10 MB | ~5 MB | varies (CEF or system) |
| **npm / Node compat** | Yes (it is Node) | Yes (via Bun) | No | No | Yes (Deno's Node compat) |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just yes/no

| **Framework auto-detect** | No | No | No | No | Yes |
| **HMR** | No | Yes | Yes (Vite-based) | Yes (`dx serve`) | Yes |
| **Built-in auto-update** | Full binary | bsdiff | Plugin | None | bsdiff |
| **Built-in installers** | Yes | No | Yes | No | Partial (DMG, AppImage) |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about msi?

supports cross-platform builds via electron-builder, but needs Node and
platform-specific signing tools per target.

**Full Node compatibility, with a choice of engine.** Electron bundles both

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Full Node compatibility, with a choice of engine.** Electron bundles both
**Full Node compatibility, with a choice of backend.** Electron bundles both

Comment on lines +72 to +74
**Electrobun — fast iteration on macOS.** Electrobun's start-up speed and HMR
are excellent on macOS. If you only ship Mac apps and like the Bun ecosystem, it
is a strong choice.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wat?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants